<?Lassoscript
// Last modified 12/19/11 by Eric Landmann

// CHANGE NOTES
// 12/19/11
// First implementation

// FUNCTIONALITY
// Prep the Slider upload path

// Set Type of Upload and Destination Path
#TypeofUpload = 'Image';
#destPath = $svSliderImagesPath;
#processedPath = $svImagesUploadProcessedPath;

// Grab the prefix for the file (everything before the .) and build a new unique outfile name	
Local('FilePrefix' = (#fileReal->Split('.')));
#NewFileName = ((#FilePrefix->Get:1)+'_'+(Create_UIDShort)+'.jpg');

// Concatonate the path and filename
// Filepath to the uploaded file should be something like "/uploads/P10839275.jpg"
#ThisFilePath = ((#destPath)+(#NewFileName));
Debug;
	('207: ThisFilePath = '+(#ThisFilePath)+'<br>\n');
/Debug;

// Create the source file
File_Create((#ThisFilePath), -FileOverWrite);
File_Write(#ThisFilePath, (File_Read(#fileName)));

?>
